package com.rephilo.mvc.framework.service;

import com.rephilo.mvc.framework.annotions.Service;

/**
 * 权限校验service
 *
 * @author rephilo
 */
@Service
public class MySecurityManager {

    /**
     * 获取当前用户的权限角色
     *
     * @param userName
     * @return
     */
    public String getRoleByUserName(String userName) {
        if ("admin".equals(userName)) {
            return "admin";
        } else if ("manager".equals(userName)) {
            return "manager";
        } else {
            return "user";
        }
    }
}
